import Vue from 'vue'
import Router from 'vue-router'
import _import from './_import'
import Home from '@/views/home/index'

Vue.use(Router)

export const indexRouter = {
    path: '/',
    name: '主页',
    component: Home,
    redirect: '/WeChart/index'
}

//业务页面
export const bizRouter = [
    {
        path: '/WeChart',
        name: '聊天Tabbar',
        component: Home,
        children: [
            {
                path: 'index',
                name: '聊天',
                component: _import('biz/WeChat'),
            }
        ]
    },
    {
        path: '/Demo',
        name: '聊天Tabbar',
        component: Home,
        children: [
            {
                path: 'index',
                component: _import('biz/DemoList'),
            }
        ]
    }
]



export const constantRouters = [
    indexRouter,
    ...bizRouter
]

export default new Router({
  routes: constantRouters
})
